CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )

PROJECT( qdisplay )

#SET( CMAKE_BUILD_TYPE RELEASE )
SET( CMAKE_BUILD_TYPE DEBUG )

SET( SRCS
  src/QwImageViewer.cpp
  src/QiLaserScan.cpp
  src/QwController.cpp
)

SET( HEADERS
  src/QwImageViewer.h
  src/QiLaserScan.h
  src/QwController.h
)

FIND_PACKAGE( Qt4 COMPONENTS QtCore QtGui REQUIRED )
FIND_PACKAGE( OpenCV REQUIRED )
FIND_LIBRARY( SENSOR_LIBRARY sensor ${CMAKE_INSTALL_PREFIX}/lib )

QT4_WRAP_CPP( HEADERS_MOC ${HEADERS} )

INCLUDE_DIRECTORIES( 
  ${QT_INCLUDES}
  ${OpenCV_INCLUDE_DIRS}
  ${CMAKE_INSTALL_PREFIX}/include
)

ADD_LIBRARY( qdisplay SHARED ${SRCS} ${HEADERS_MOC} )

TARGET_LINK_LIBRARIES( qdisplay
  ${QT_LIBRARIES} 
  ${OpenCV_LIBS}
)

INSTALL( TARGETS qdisplay LIBRARY DESTINATION lib )
INSTALL( FILES ${HEADERS} DESTINATION include/qdisplay )


